<%@ page language="java" import="java.util.*"
	import="com.gxuwz.medical.domain.area.*" import="com.gxuwz.medical.domain.medical.*" import="com.gxuwz.medical.dao.S201Dao" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="../../css/pintuer.css">
<link rel="stylesheet" href="../../css/admin.css">
<script src="../../js/jquery-1.4.4.min.js"></script>
<script src="../../js/pintuer.js"></script>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
</head>
<body>
	<%
		S201Dao sdao = new S201Dao();
		List<S201> list01 = sdao.queryListByType("01");
		List<S201> list02 = sdao.queryListByType("02");
		List<S201> list04 = sdao.queryListByType("04");
		List<S201> list06 = sdao.queryListByType("06");
		List<S201> list03 = sdao.queryListByType("03");
		List<S201> list0301 = sdao.queryListByType("0301");
		String jgbm = request.getParameter("jgbm");
		jgbm = new String(jgbm.getBytes("ISO-8859-1"), "UTF-8");
		Medical medical = new Medical();
		medical.setJgbm(jgbm);
		medical= medical.query();
	%>
	<div class="panel admin-panel">
		<div class="panel-head" id="add">
			<strong><span class="icon-pencil-square-o"></span>修改医疗机构信息</strong>
		</div>
		<div class="body-content">
			<form method="post" class="form-x"
				action="<%=path%>/system/MedicalServlet?method=edit">
				<div class="form-group">
					<div class="label">
						<label>机构编码：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=medical.getJgbm() %>" name="jgbm"
							data-validate="required:请输入机构编码" disabled="disabled"/>
						<input type="text" class="input w50" value="<%=medical.getJgbm() %>" name="jgbm"
							data-validate="required:请输入机构编码" style="display: none"/>
					</div>
				</div>
				
				

				<div class="form-group">
					<div class="label">
						<label>组织机构编码：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=medical.getZzjgbm() %>" name="zzjgbm"
							data-validate="required:请输入组织机构编码" />
					</div>
				</div>

				<div class="form-group">
					<div class="label">
						<label>机构名称：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=medical.getJgmc() %>" name="jgmc"
							data-validate="required:请输入机构名称" />
					</div>
				</div>

				<div class="form-group">
					<div class="label">
						<label>地区编码：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=medical.getDqbm() %>" name="dqbm"
							data-validate="required:请输入地区编码" />
					</div>
				</div>

				<div class="form-group">
					<div class="label">
						<label>行政区域：</label>
					</div>
					<div class="field">
						<select name="areacode">
							<%
								Area a = new Area();
								List<Area> list = a.queryAll();
								for (int i = 0; i < list.size(); i++) {
							%>
							<option value="<%=list.get(i).getAreacode()%>"
							<%
							if(list.get(i).getAreacode().equals(medical.getAreacode())){
							 %>
							selected="selected">
							<%
							}else{
							 %>
							 >
							 <%} %>
								<%
									out.print("|");
										for (int t = 0; t < list.get(i).getArealevel() - 1; t++) {
											out.print("—");
										}
								%>
								<%=list.get(i).getAreaname()%>

							</option>
							<%
								}
							%>
						</select>
					</div>
				</div>

				<div class="form-group">
					<div class="label">
						<label>隶属关系：</label>
					</div>
					<div class="field">
						<select id="lsgx" name="lsgx">
							<%
								for (S201 m : list02) {
							%>
							<option value="<%=m.getItemcode()%>"
							
							<%
							if(m.getItemcode().equals(medical.getLsgx())){
							 %>
							selected="selected">
							<%
							}else{
							 %>
							 >
							 <%} %>
							<%=m.getItemname()%></option>
							<%
								}
							%>
						</select>
					</div>
				</div>
				
				<div class="form-group">
					<div class="label">
						<label>机构级别：</label>
					</div>
					<div class="field">
						<select id="jgjb" name="jgjb" >
							<%
								for (S201 m : list06) {
							%>
							<option value="<%=m.getItemcode()%>"
							<%
							if(m.getItemcode().equals(medical.getJgjb())){
							 %>
							selected="selected">
							<%
							}else{
							 %>
							 >
							 <%} %>
							<%=m.getItemname()%></option>
							<%
								}
							%>
						</select>
					</div>
				</div>
				
				<div class="form-group">
					<div class="label">
						<label>申报定点类型：</label>
					</div>
					<div class="field">
						<select id="sbddlx" name="sbddlx" >
							<%
								for (S201 m : list04) {
							%>
							<option value="<%=m.getItemcode()%>"
							<%
							if(m.getItemcode().equals(medical.getSbddlx())){
							 %>
							selected="selected">
							<%
							}else{
							 %>
							 >
							 <%} %>
							<%=m.getItemname()%></option>
							<%
								}
							%>
						</select>
					</div>
				</div>				
				<div class="form-group">
					<div class="label">
						<label>批准定点类型：</label>
					</div>
					<div class="field">
						<select id="pzddlx" name="pzddlx" >
							<%
								for (S201 m : list04) {
							%>
							<option value="<%=m.getItemcode()%>"
							<%
							if(m.getItemcode().equals(medical.getPzddlx())){
							 %>
							selected="selected">
							<%
							}else{
							 %>
							 >
							 <%} %>
							<%=m.getItemname()%></option>
							<%
								}
							%>
						</select>
					</div>
				</div>	
				<div class="form-group">
					<div class="label">
						<label>所属经济类型：</label>
					</div>
					<div class="field">
						<select id="ssjjlx" name="ssjjlx" >
							<%
								for (S201 m : list01) {
							%>
							<option value="<%=m.getItemcode()%>"
							<%
							if(m.getItemcode().equals(medical.getSsjjlx())){
							 %>
							selected="selected">
							<%
							}else{
							 %>
							 >
							 <%} %>
							<%=m.getItemname()%></option>
							<%
								}
							%>
						</select>
					</div>
				</div>		
				<div class="form-group">
					<div class="label">
						<label>卫生机构大类：</label>
					</div>
					<div class="field">
						<select id="wsjgdl" name="wsjgdl">
							<%
								for (S201 m : list03) {
							%>
							<option value="<%=m.getItemcode()%>"
							<%
							if(m.getItemcode().equals(medical.getWsjgdl())){
							 %>
							selected="selected">
							<%
							}else{
							 %>
							 >
							 <%} %>
							<%=m.getItemname()%></option>
							<%
								}
							%>
						</select>
					</div>
				</div>
				
				<div class="form-group">
					<div class="label">
						<label>卫生机构小类：</label>
					</div>
					<div class="field">
						<select id="wsjgxl" name="wsjgxl">
							<%
								for (S201 m : list0301) {
							%>
							<option value="<%=m.getItemcode()%>"
							<%
							if(m.getItemcode().equals(medical.getWsjgxl())){
							 %>
							selected="selected">
							<%
							}else{
							 %>
							 >
							 <%} %>
							<%=m.getItemname()%></option>
							<%
								}
							%>
						</select>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>主管单位：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=medical.getZgdw() %>" name="zgdw"
							data-validate="required:请输入主管单位" />
					</div>
				</div>		
				
				<div class="form-group">
					<div class="label">
						<label>开业时间：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=medical.getKysj() %>" name="kysj"
							data-validate="required:请输入开业时间" />
					</div>
				</div>	
				
				<div class="form-group">
					<div class="label">
						<label>法人代表：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=medical.getFrdb() %>" name="frdb"
							data-validate="required:请输入法人代表" />
					</div>
				</div>	
				
				<div class="form-group">
					<div class="label">
						<label>注册资金：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=medical.getZczj() %>" name="zczj"
							data-validate="required:请输入注册资金" />
					</div>
				</div>
										
				<div class="form-group">
					<div class="label">
						<label></label>
					</div>
					<div class="field">
						<button class="button bg-main icon-check-square-o" type="submit">
							提交</button>
					</div>
				</div>
			</form>
		</div>
	</div>

</body>
</html>